var boardRunningMixin = function () {
  return {
    data: function () {
      return {
        timeoutList: [],
      };
    },

    beforeDestroy: function () {
      this.clearTimeoutList();
    },

    methods: {
      clearTimeoutList: function (index) {
        var timeoutList = this.timeoutList;
        if (index !== undefined) {
          var timeout = timeoutList[index];
          if (!SysUtil.isEmpty(timeout)) {
            clearTimeout(timeout);
            timeoutList[index] = null;
          }
          return;
        }
        if (timeoutList.length > 0) {
          for (var i = 0; i < timeoutList.length; i++) {
            var timeout = timeoutList[i];
            if (!SysUtil.isEmpty(timeout)) {
              clearTimeout(timeout);
            }
          }
          this.timeoutList = [];
        }
      }
    }
  };
}();
